﻿	//-----------------------------------------------------------------------//
	// <copyright file="Level.cs" company="A.D.F.Software">
	// Copyright "A.D.F.Software" (c) 2014 All Rights Reserved
	// <author>Andrea M. Falappi</author>
	// <date>Wednesday, September 24, 2014 11:36:49 AM</date>
	// </copyright>
	//
	// * NOTICE:  All information contained herein is, and remains
	// * the property of Andrea M. Falappi and its suppliers,
	// * if any.  The intellectual and technical concepts contained
	// * herein are proprietary to A.D.F.Software
	// * and its suppliers and may be covered by World Wide and Foreign Patents,
	// * patents in process, and are protected by trade secret or copyright law.
	// * Dissemination of this information or reproduction of this material
	// * is strictly forbidden unless prior written permission is obtained
	// * from Andrea M. Falappi.
	//-----------------------------------------------------------------------//

using System;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Input;
using PrinceOfPersia.PopNet;

namespace PrinceOfPersia.PopNet
{


    public class Level
    {
        public RoomRow[] rows;
        public Enumeration.LevelName levelName = Enumeration.LevelName.dungeon_demo;


        public Level()
        {
            //rows = new RoomRow[10];

            //for (int x = 0; x < rows.Count(); x++)
            //{
            //    rows[x] = new RoomRow(10);
            //}
        }

        public Level(int sizeRow, int sizeColumn)
        {
            rows = new RoomRow[sizeRow];

            for (int x = 0; x < rows.Count(); x++)
            {
                rows[x] = new RoomRow(sizeColumn);
            }

        }





        public void Serialize()
        {
            System.Xml.Serialization.XmlSerializer ax = new System.Xml.Serialization.XmlSerializer(typeof(Level));
            TextWriter writer = new StreamWriter(@"C:\temp\LEVEL_" + levelName.ToString() + ".xml");
            ax.Serialize(writer, this);
        }

    }
}
